package com.example.message;

import com.example.dto.User;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(consumerGroup = "spring-boot-consumer", topic = "boot-mq", selectorExpression = "user")
public class Consumer implements RocketMQListener<User> {

    @Override
    public void onMessage(User user) {
        log.info(user.toString());
    }
    

    
}
